#include "..\common\svmConfig.h"
#include <cstdlib>
#include <cstdio>

#ifndef __SVMCLASSIFYCONFIG_H__
#define __SVMCLASSIFYCONFIG_H__

class svmClassifyConfig : public svmConfig {
public:
	svmClassifyConfig():svmConfig(),outputFilename(NULL),testingFilename(NULL),nClass(0),nTasks(0),nSV(0),SVDim(0) {}
	~svmClassifyConfig() {
		if(outputFilename != NULL)
			free(outputFilename);
	}
	void parseCommand(const int &argc, const char** &argv);
	void checkDimension(int);
	void readModel();
	void cleanModel();
	char *outputFilename;
	char *testingFilename;
	int nClass;
	int nTasks;				/// total number of decision functions
	int nSV;				/// total number of support vectors
	int SVDim;
	float* supportVectors;	/// support vector data
	float* alpha;			/// alpha array
	float* rho;				/// b array
	int * classLabels;		/// label of each class
	float class1Label, class2Label;
private:
	void printHelp();
	static const int maxLen = 1024;
	char *modelFilename;
	int max_line_len;
	char *line;
	char *readline(FILE*);
};

#endif

